package com.hm.service.impl.task.help;

import org.quartz.JobKey;
import org.quartz.TriggerKey;

import java.util.HashMap;

import static org.quartz.JobKey.jobKey;

/**
 * 常量集合
 */
public class TaskMap {

    //案件推送任务
    private static final String pushTaskId = "100001";
    private static final JobKey pushJobKey = jobKey("pushCaseJob", "taskGroup");
    private static final TriggerKey PushTriggerKey = TriggerKey.triggerKey("pushCaseTrigger", "taskGroup");

    //其他任务..
    private static final String taskId = "100002";
    private static final JobKey jobKey = jobKey("Job", "taskGroup");
    private static final TriggerKey triggerKey = TriggerKey.triggerKey("trigger", "taskGroup");

    //根据唯一任务号获取JobKey和TriggerKey
    public static final HashMap<String, JobKey> jobKeyMap = new HashMap<>() {
        {
            put(pushTaskId, pushJobKey);
            put(taskId, jobKey);
        }
    };
    public static final HashMap<String, TriggerKey> triggerKeyMap = new HashMap<>() {
        {
            put(pushTaskId, PushTriggerKey);
            put(taskId, PushTriggerKey);
        }
    };

}
